# 初始化工厂
factory = EnhancedAIFactory()

# 示例1: 使用禅镜创建数字人视频
zen_result = factory.create_zenmirror_video(
    script="大家好，欢迎使用禅镜数字人模型。这是一个演示视频。",
    avatar_id="professional_male_001",
    resolution="1080p",
    emotion_intensity=0.8
)

if zen_result["success"]:
    print(f"禅镜任务创建成功: {zen_result['task_id']}")

    # 轮询检查状态
    import time

    while True:
        status = factory.check_zenmirror_status(zen_result["task_id"])
        if status["status"] == "completed":
            print(f"视频生成完成: {status['video_url']}")
            break
        elif status["status"] == "failed":
            print(f"生成失败: {status['error']}")
            break
        else:
            print(f"进度: {status['progress']}%")
            time.sleep(10)

# 示例2: 使用闪剪自动编辑视频
fc_result = factory.auto_edit_with_flashcut(
    video_path="input_video.mp4",
    edit_style="cinematic",
    music_intensity="high"
)

# 示例3: 从脚本生成完整视频
script_result = factory.create_flashcut_video(
    script="这是一个关于人工智能的科普视频...",
    media_materials=["image1.jpg", "video_clip1.mp4"],
    style="educational"
)

# 示例4: 获取可用数字人形象
avatars = factory.get_available_avatars()
print(f"可用形象数量: {len(avatars)}")